<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>"/>
    
    <title>修改地址</title>
    
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
	<meta http-equiv="description" content="This is my page"/>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<script type="text/javascript" src="/js/jquery-1.4.4.min.js"></script>
<script src="/js/formValidator-4.1.0.js" type="text/javascript" charset="UTF-8"></script>
<script src="/js/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		  		$.formValidator.initConfig({formID:"actForm",debug:false,submitOnce:true,
				onError:function(msg,obj,errorlist){
					$("#errorlist").empty();
					$.map(errorlist,function(msg){
						$("#errorlist").append("<li>" + msg + "</li>")
					});
					alert(msg);
				},
				submitAfterAjaxPrompt : '有数据正在异步验证，请稍等...',
				onShowClass : "",
				onFocusClass : "",
				onCorrectClass : ""
			});
			$("#type").formValidator({onShow:"分类名称不能为空",onFocus:"分类名称不能为空",onCorrect:"分类名称不能为空"}).inputValidator({min:1,max:10,onError:"分类名称最少1个字符，最多10个字符"});
	  	});
	</script>
  </head>
  
  <body>
  您当前的位置：地址管理--修改
  <div style="margin-left: auto;margin-right: auto;width: 550px;">
     <form action="/adress.do?method=updateClothingType" method="post" id="actForm" enctype="multipart/form-data"> 
     	省/直辖市名称：
    	<select id="cid" name="cid">
    	<option value="0">请选择</option>
    	    	<c:forEach items="${flist}" var="flist">
					<c:if test="${type.pid==flist.id}"><option value="${flist.id}" selected="selected">${flist.adressName}</option></c:if>
					<c:if test="${type.pid!=flist.id}"><option value="${flist.id}">${flist.adressName}</option></c:if>
				</c:forEach>
    	</select>      
    	     <input type="hidden" id="id" name="id" value="${type.id}"/>    
         城市名称：<input type="text" id="type" name="type" value="${type.adressName}"/>
  			 <input type="submit" value="修改"/><br/>
    	     <span style="color: red;">${error}</span>
    </form>
       </div>
  </body>
</html>
